package org.eggermont.hm.cluster;

import java.util.ArrayList;
import java.util.List;

import org.eggermont.hm.util.BoundingBox;

public class Cluster {

    private final int startIndex;

    private final int size;

    private final List<Cluster> sons = new ArrayList<Cluster>();

    private BoundingBox boundingBox = null;

    public Cluster(int startIndex, int size) {
        this.startIndex = startIndex;
        this.size = size;
    }

    public Cluster getSon(int i) {
        return sons.get(i);
    }

    public void addSon(Cluster c) {
        sons.add(c);
    }

    public int getNrOfSons() {
        return sons.size();
    }

    public int getSize() {
        return size;
    }

    public int getStartIndex() {
        return startIndex;
    }

    public BoundingBox getBoundingBox() {
        return boundingBox;
    }

    public void setBoundingBox(BoundingBox boundingBox) {
        this.boundingBox = boundingBox;
    }
}
